    function setCookie (cvalue) {
    var d = new Date();
        d.setTime(d.getTime() + (5 * 60 * 1000));
    var expires = "expires=" + d.toUTCString();
    document.cookie= "JSESSIONID" + "=" + cvalue + "; " + expires;
}
//获取cookie
    function getCookie () {
    var arr, reg = new RegExp("(^| )" + "JSESSIONID" + "=([^;]*)(;|$)");
    if (arr = document.cookie.match(reg))
        return (arr[2]);
    else
        return null;

}
    function delCookie () {
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval = getCookie("JSESSIONID");
    if (cval != null)
        document.cookie = "JSESSIONID" + "=" + cval + ";expires=" + exp.toGMTString();
}
export {
    setCookie,getCookie,delCookie
}